package com.live.video.web.controller;

import com.live.video.authority.vo.CommonResponseVO;
import com.live.video.web.service.VideoFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author CHENCHEN
 * @title
 * @createTime 2022-07-2620:21
 */
@Api(tags = "视频文件")
@Slf4j
@RestController
@RequestMapping("videoFile")
public class VideoFileController {

    @Autowired
    private VideoFileService videoFileService;

    @ApiOperation(value="获取知识点视频视频", notes = "根据知识点ID获取视频列表",
            httpMethod = "POST")
    @GetMapping("findVideoList")
    public CommonResponseVO findVideoList(@RequestHeader("Authorization") String token, Long knowledgeContentId){
        log.info("stageId value is [{}]", knowledgeContentId);
        return videoFileService.findVideoFileListByKnowledgeContentId(knowledgeContentId);
    }
}
